﻿using Crawler.DomainServices.DataServices;
using Crawler.DomainServices.Download;
using Crawler.DomainServices.Processors;
using Crawler.Infrastructure;
using StructureMap;
using StructureMap.Configuration.DSL;

namespace ConsoleApplication1
{
	class ClientRegistry : Registry
	{
		public ClientRegistry()
		{
			For<IBootstrap>().Use<LogBootstrapper>();
			For<IDataServicesConfiguration>().Singleton().Use<CrawlerConfiguration>();
			For<IDownloadConfiguration>()
				.Use(() => (CrawlerConfiguration) ObjectFactory.GetInstance<IDataServicesConfiguration>());
			For<IProcessorsConfiguration>()
			.Use(() => (CrawlerConfiguration)ObjectFactory.GetInstance<IDataServicesConfiguration>());
		}
	}
}